
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class HomeCard extends StatelessWidget {

  final Icon icon;
  final Color color;
  final Text title;
  final Text content;

  HomeCard({Key key, this.icon, this.color, this.title, this.content}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: Get.width / 2 - 30,
      height: Get.width / 2,
      margin: EdgeInsets.only(top: 10, bottom: 10, left: 20),
      decoration: BoxDecoration(
        color: color,
        borderRadius: BorderRadius.all(Radius.circular(14))
      ),
      child: Column(
        children: [
          Row(
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Padding(padding: EdgeInsets.only(left: 10, top: 5, bottom: 5), child: icon,),
              Padding(padding: EdgeInsets.only(left: 5), child: title,)
            ],
          ),
          Center(child: content,)
        ],
      ),
    );
  }

}